//
//  Profile.m
//  LStyle
//
//  Created by Obaid Abdul Maroof on 12/3/09.
//  Copyright 2009 Vrije University. All rights reserved.
//

#import "Profile.h"


@implementation Profile

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    return self;
}
*/


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
	self.createFooter;

	tcProfile = [[UITabBar alloc] initWithFrame:CGRectMake(0, 480-50, 320, 30)];
	
	[tcProfile addSubview:lblProfile];
	[tcProfile addSubview:lblNetwork];
	[tcProfile addSubview:lblSend];
	[tcProfile addSubview:lblContact];
		
	[self.view addSubview:tcProfile];
	
	currentView = profileView;
	lblCurrent = lblProfile;
}


- (void)viewWillAppear:(BOOL)animated
{
	self.navigationController.navigationBarHidden = YES;
}

-(void) createFooter{
	UIFont *fnt = [UIFont fontWithName:@"Verdana" size: 10.0];
	lblProfile = [[UILabel alloc] initWithFrame:CGRectMake(15, 5, 60, 20)];
	lblNetwork = [[UILabel alloc] initWithFrame:CGRectMake(80, 5, 60, 20)];
	lblSend = [[UILabel alloc] initWithFrame:CGRectMake(145, 5, 70, 20)];
	lblContact = [[UILabel alloc] initWithFrame:CGRectMake(220, 5, 80, 20)];
	
	lblProfile.textAlignment = UITextAlignmentCenter;
	lblNetwork.textAlignment = UITextAlignmentCenter;
	lblSend.textAlignment = UITextAlignmentCenter;
	lblContact.textAlignment = UITextAlignmentCenter;
	
	[lblProfile setBackgroundColor:[UIColor darkGrayColor]];
	[lblNetwork setBackgroundColor:[UIColor clearColor]];
	[lblSend setBackgroundColor:[UIColor clearColor]];
	[lblContact setBackgroundColor:[UIColor clearColor]]; 
	
	lblProfile.text = @"Profile";
	lblNetwork.text = @"Network";
	lblSend.text = @"Send Mail";
	lblContact.text = @"Contact";
	
	lblProfile.font = fnt;
	lblNetwork.font = fnt;
	lblSend.font = fnt;
	lblContact.font = fnt;
	
	lblProfile.textColor = [UIColor whiteColor];	
	lblNetwork.textColor = [UIColor whiteColor];	
	lblSend.textColor = [UIColor whiteColor];		
	lblContact.textColor = [UIColor whiteColor];	
	
	lblProfile.userInteractionEnabled = YES;
	lblNetwork.userInteractionEnabled = YES;
	lblSend.userInteractionEnabled = YES;
	lblContact.userInteractionEnabled = YES;
}

/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


-(void)Back:(id)sender{
	[self.navigationController popViewControllerAnimated:YES];
}

@end
